package com.bwie.controller;

import com.bwie.param.TbFriendParam;
import com.bwie.service.TbFriendService;
import com.bwie.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * description:
 *
 * @Author youhongwei
 * @Create 2025/6/17 13:49
 * @Version 1.0
 */
@RestController
@RequestMapping("user/friend")
public class FriendController {
    @Autowired
    private TbFriendService tbFriendService;

    /**
     * 好友列表
     * @param tbFriendParam
     * @return
     */
    @PostMapping("friendList")
    public R friendList(@RequestBody TbFriendParam tbFriendParam){
        return tbFriendService.friendList(tbFriendParam);
    }

    @PostMapping("deleteByFriend/{friendId}")
    public R deleteByFriend(@PathVariable("friendId") Integer friendId){
        return tbFriendService.deleteByFriend(friendId);
    }

}
